﻿using System.Collections.Generic;
using Noodles.Core.Model;

namespace Noodles.Core.Repositories
{
    /// <summary>
    /// Should you ever need to add functionality specific to a single class, extend
    /// the interface. See IMonkeyRepository.
    /// </summary>
    public interface IRepository
    {
        TEntity Get<TEntity>(object id);
        IEnumerable<TEntity> FindAll<TEntity>() where TEntity : class;
        IEnumerable<TEntity> Find<TEntity>(IQuery<TEntity> query) where TEntity : class;
        //PagedData<TEntity> Find<TEntity>(IPagedQuery<TEntity> query, int pageSize) where TEntity : class;
        TEntity FindFirst<TEntity>(IQuery<TEntity> query) where TEntity : class;
        TEntity FindFirstOrDefault<TEntity>(IQuery<TEntity> query) where TEntity : class;
        //TEntity FindFirstOrDefault<TEntity>(IPagedQuery<TEntity> query) where TEntity : class;
        void Execute(ICommand command);
        void Add(object entity);
        void Remove(object entity);
    }
   

}
